<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<button type="button" @click="changeName">切换name</button>
			<h3>hi:{{name}}{{add}}</h3>
		</div>
		
		<!-- 引入vue.js库 -->
		<script src="./node_modules/vue/dist/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			
			
			let vm=new Vue({
				//options
				el:document.getElementById('app'),
				data:{
					name:"rose"
				},
				methods:{
					//方法
					changeName(){
					this.$data.name='张三';	
					}
				},
				computed:{
					add(){
						return 1+1;
					}
				},
			})
		</script>
	</body>
</html>
